Skip to main content

Angle

Angle dimension measures the angle between three points. These points can be in the main planes (XZ, XY, YZ) or in a custom plane. It measures angles from 0 to 180 degrees.


Parameters

Inspector_AngleDImension


Components

AngleDimension_XZ

The angle dimension consists of four components:

  1. Lines : Two lines that form the angle.
  2. Number : The numeric value of the angle in degrees.
  3. Arc : A plane with a transparent material to draw the arc between the two lines.
  4. Arc Scale Parameter : A parameter to control the scale of the arc GameObject.

Arc Appearance

The arc of the angle dimension is beautifully crafted with the help of its material shader, which offers the essential options of color and degree, as well as additional options to cater to individual requirements.


Automatic Text Adjustment for Tight Angles

AngleDimension_TextNotFit

When the angle between two lines is too tight, the text may overflow and not fit between them. In this case, the script will automatically move and rotate the text, setting its position above one of the lines in a proper way and aligning the rotation to the direction of the line that the text is placed above.

tip

To customize the position of the text when it overflows and moves to a new position, you can use the Text Offset If Not Fit parameter, which is a Vector2 input.


Dynamic Transform Support for Angle Dimension

IsDynamic_AngleDimension

Similar to other dimensions, the angle dimension also supports dynamic transform if you check the isDynamic option. This allows the dimension to adjust and update itself based on the changing positions and orientations of the objects it is measuring.

By enabling this option, you can use the angle dimension with moving or changing objects without needing to recreate it each time.

Drawing an Angle Dimension on a Custom Plane

AngleDimension_Free

The angle dimension can be drawn in the main planes (XZ, XY, YZ) or on a custom plane. To draw an angle dimension on a custom plane, simply change the angleMeasurementPlane parameter to Free, and then click on the points that you need to measure.

This allows you to measure angles on planes that are not aligned with the main coordinate axes. By selecting the appropriate points, you can define any plane and measure angles on it with the angle dimension.

tip

To reduce any intersection between the dimension and target objects, you can increase thenormalOffset parameter if the dimension is individual or hitNormalOffset in the starter script if it's not individual. This parameter will get the first hit point normal and move the dimension along it forward. It will also help to avoid Z-fighting. Always set it to a small amount.